package db.entity;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the coefficient database table.
 * 
 */
@Embeddable
public class CoefficientPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	private String stationName;

	private String arm;

    public CoefficientPK() {
    }
	public String getStationName() {
		return this.stationName;
	}
	public void setStationName(String stationName) {
		this.stationName = stationName;
	}
	public String getArm() {
		return this.arm;
	}
	public void setArm(String arm) {
		this.arm = arm;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof CoefficientPK)) {
			return false;
		}
		CoefficientPK castOther = (CoefficientPK)other;
		return 
			this.stationName.equals(castOther.stationName)
			&& this.arm.equals(castOther.arm);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.stationName.hashCode();
		hash = hash * prime + this.arm.hashCode();
		
		return hash;
    }
}